package com.ycrlkj.android.modulescore.main.apiservice;

import com.ycrlkj.android.modulescore.main.entity.FreightOrder;
import com.ycrlkj.android.modulescore.main.entity.Query.FreightOrderQuery;
import com.ycrlkj.android.modulespublic.common.net.response.MResponse;
import com.ycrlkj.android.modulespublic.common.net.response.ResultData;
import java.util.List;
import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;

/**
 * 复制此类时说明:
 * 注意: 每新增一个 XXXXApiService 文件需要向 BaseApiService 中添加一个注入的生产者
 */
public interface FreightOrderApiService {

    @POST("freightOrder/getAll")
    Observable<MResponse<List<FreightOrder>>> getAll(@Body FreightOrderQuery freightOrderQuery);

    @POST("freightOrder/online/getAll")
    Observable<MResponse<List<FreightOrder>>> getAllOnline(@Body FreightOrderQuery freightOrderQuery);

    @GET("freightOrder/getById/{id}")
    Observable<MResponse<FreightOrder>> getById(@Path("id") String id);

    @POST("freightOrder/add")
    Observable<MResponse<ResultData>> add(@Body FreightOrder freightOrder);

    @POST("freightOrder/consignorCreateOrder")
    Observable<MResponse<ResultData>> consignorCreateOrder(@Body FreightOrder freightOrder);

    @PUT("freightOrder/edit")
    Observable<MResponse<ResultData>> edit(@Body FreightOrder freightOrder);

}
